<?php

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/

Route::get('/', function () {
    return view('welcome');
});
//登录路由
Route::any('admin/login','Admin\LoginController@login');
Route::any('admin/loginDo','Admin\LoginController@loginDo');



//非法登录
Route::prefix("admin/")->middleware('checklogin')->group(function(){
//后台首页
Route::any('index','Admin\IndexController@index');

//轮播图
Route::any('wheelAdd','Admin\WheelController@wheelAdd');
Route::any('wheelCreate','Admin\WheelController@wheelCreate');
Route::any('wheelIndex','Admin\WheelController@wheelIndex');
Route::any('changevalue','Admin\WheelController@changevalue');

//球队路由
Route::any('teamAdd','Admin\TeamController@teamAdd');
Route::any('teamCreate','Admin\TeamController@teamCreate');
Route::any('teamIndex','Admin\TeamController@teamIndex');

//球员路由
Route::any('playerAdd','Admin\PlayerController@playerAdd');
Route::any('playerCreate','Admin\PlayerController@playerCreate');
Route::any('playerIndex/{team_id}','Admin\PlayerController@playerIndex');
Route::any('playerIndexs','Admin\PlayerController@playerIndexs');

//比赛路由
Route::any('matchAdd','Admin\MatchController@matchAdd');
Route::any('matchCreate','Admin\MatchController@matchCreate');
Route::any('matchIndex','Admin\MatchController@matchIndex');

//数据路由
Route::any('dataAdd/{match_id}','Admin\DataController@dataAdd');
Route::any('dataCreate','Admin\DataController@dataCreate');
Route::any('dataIndex','Admin\DataController@dataIndex');

});
